package com.jame.basics.thread;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class TestClass {
    volatile static int thisIndex = 1;
    volatile static int flage = 0;

    public static void main(String[] args) throws ExecutionException, InterruptedException {

        System.exit(1);

        FutureTask<Integer> futureTask=new FutureTask(()->{
            for (int i = 0; i < 100; i++) {
                System.out.println(i+"=="+Thread.currentThread().getName());
            }
            return 1;
        });

        new Thread(futureTask).start();
        System.out.println(futureTask.get());

    }
}
